<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>11</title>
        <script src="../js/jquery-1.8.3.js" language="javascript1.5"
        type="text/javascript"></script>
        <script type="text/javascript" src="../js/jquery.blockUI.js"></script>
        <style>
            .div {
                width: 100%;
                height: 100%;
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
            }

            .divnei {
                width: 99.5%;
                height: 99%;
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
            }

            .position {
                background: url(../images/titlebg2.jpg) top repeat-x;
                border: solid 1px #92B2BF;
                line-height: 25px;
                margin-top: 5px;
                margin-left: 5px;
                margin-right: 5px;
            }

            .keyUp {
                background-image: url(../images/titleUpbutton.jpg);
                margin-left: 3px;
                vertical-align: bottom;
                text-align: center;
                width: 72px;
                height: 64px;
                font-size: 12px;
                color: #FFFFFF;
                font-weight: bold;
            }

            .keyDown {
                background-image: url(../images/titleDownbutton.jpg);
                margin-left: 3px;
                vertical-align: bottom;
                text-align: center;
                width: 72px;
                height: 64px;
                font-size: 12px;
                color: #FA0109;
                font-weight: bold;
            }

            .menuOption {
                text-align: left;
                background: url(../images/bgt.jpg) no-repeat left top;
                font-size: 13px;
                color: #206851
            }

            .menuOptionck {
                text-align: left;
                background: url(../images/bgt1.jpg) no-repeat left top;
                border-top: solid 1px #92B2BF;
                border-bottom: solid 1px #92B2BF;
                font-size: 13px;
                color: #206851
            }

            #idHandle {
                cursor: pointer;
                overflow: hidden;
            }

            .box {
                display: inline-block;
                width: 215px;
                height: 50px;
            }

            .box2 {
                background: transparent url(../images/mainpagelogo.png) no-repeat scroll
                    left top !important;
                background: none;
                _filter: progid :     DXImageTransform.Microsoft.AlphaImageLoader (    
                    src =  
                    '../images/mainpagelogo.png', sizingMethod =     'scale' );
            }
        </style>
        <script language="javascript1.5" type="text/javascript">
            function blockAll(){
                $.blockUI({message: '<image src="../images/wait.gif"></image>',
                    css: {
                        border: 'none',                   // 无边界
                        width:"0px",                     // 中间框框的宽度
                        top:"50%",                        // 高居中
                        left:"50%"                        // 左居中
                    }
                    ,overlayCSS: { backgroundColor: '#FFFFFF' }});
            }



            function unblockAll(){
                setTimeout($.unblockUI,1);   
            }


            var allHeight=null;
            var allWidth=null;
            var frameWidth=null;
            var frameHeight=null;
            var intervals = null;
            function setHeightTable() {
                height=document.documentElement.clientHeight;
                width=document.documentElement.clientWidth;
                allHeight=height;
                allWidth=width;
                document.getElementById("neidiv").style.height=(height-69)+"px";
                document.getElementById("panel").style.height=(height-69-14)+"px";
                document.getElementById("left").style.height=(height-69-18)+"px";
                document.getElementById("mainframeDiv").style.height=(height-69-18)+"px";
                frameHeight=$("#mainframeDiv").height();
                frameWidth=$("#mainframeDiv").width();
                document.getElementById("idContainer").style.width=(width-450)+"px";
                if(intervals==null){
                    intervals = setInterval("checkLoginTimeOut()", 30000);
                }
            }
            var frist=true;
            var status = false;
            function logintimeout(){
                window.clearInterval(intervals);
                //alert("登录已经超时，请重新登录！");
                document.location = "../index.php";
            }

            var move=false;
            var oldValue=0;
            jQuery(document).ready(function(){    
                $("#idContainer").mousedown(function(e){
                    oldValue=e.pageX;
                    move=true;
                });  }) 
            $(document).mousemove(function(event){
                if(move==true){
                    $("#idContainer").scrollLeft(-(event.clientX-oldValue));
                }
            }).mouseup(function(event){
                stop();
            });
            function stop(){
                move=false;
                oldValue=0;
            }
            function logout(){
                if (confirm('确认要退出吗?')) {
                    document.location = "../index.php";
                }
            }
            var popMap={};
            var Permissions={};
            var vids="";
            function loadMenu(){
                setHeightTable();
                var htmls="";
            }
            function json2str(o) {
                var arr = [];
                var fmt = function(s) {
                    if (typeof s == 'object' && s != null) return json2str(s);
                    return /^(string|number)$/.test(typeof s) ? "'" + s + "'" : s;
                }
                for (var i in o) arr.push("'" + i + "':" + fmt(o[i]));
                return '{' + arr.join(',') + '}';
            }

            var attKey={};
            var currentObj=null;
            var flag=false;
            function selectOption(obj,id) {
                if(currentObj!=null){
                    $(currentObj).removeClass("keyDown");
                }
                $(obj).addClass("keyDown");
                currentObj=obj;
                var titleName= popMap[""+id].moduleName;
		 
                var htmls="<table width='204px'> <tr><td height='27px' background='../images/leftTitle.jpg' style='text-align:left; font-size:13px;color:#206851'><span style='margin-left:50px'>"+titleName+"</span></td></tr> ";
                var htmlEnd="</table>";
		
                if(popMap[""+id].childrenList){
                    var f=0;
                    $.each(popMap[""+id].childrenList, function (i) {
                        var menu = popMap[""+id].childrenList[i];
                        if(Permissions[menu.id]){
                            var temp="<tr><td height='27px' id='td"+f+"' onclick='openUrl(this,"+menu.id+");'  class='menuOption'><span style='margin-left:50px'>"+menu.moduleName+"</span></td></tr>"
                            htmls+=temp;
                            f++;
                        }
                    });
                    htmls+=htmlEnd;
                    $("#left").html(htmls);
                    $('#td0').click();
                }else{
                    htmls+=htmlEnd;
                    $("#left").html(htmls);
                }
            }
            var currentItem=null;
            var oldId=null;
            var hsIds = {};
            function openUrl(obj,id){
                $.blockUI({message: '<image src="../images/wait.gif"></image>',
                    css: {
                        border: 'none',                   // 无边界
                        width:"0px",                     // 中间框框的宽度
                        top:"50%",                        // 高居中
                        left:"50%"                        // 左居中
                    }
                    ,overlayCSS: { backgroundColor: '#FFFFFF' }});
                try{
                    if(currentItem!=null){
                        $(currentItem).removeClass("menuOptionck");
                    }
                    $(obj).addClass("menuOptionck");
                    if(oldId!=null){
                        $("#mainframe"+oldId).hide();
                    }
                    currentItem=obj;
                    oldId=id;
                    if (hsIds["" + id]) {
                        window.frames["mainFramestr" + id].refreshData();
                        $("#mainframe"+id).show();
                    } else {
                        window.frames["mainFramestr" + id].location.href =  popMap[""+id].url;
                 
                        $("#mainframe"+id).show();
                        hsIds["" + id] = true;
                    } 
                }catch(err){}
                setTimeout($.unblockUI,1000);      
            }

            function help(){
                alert("寻求帮助请联系管理员");
            }
        </script>
    </head>
    <body style="overflow: hidden; margin: 0; padding: 0;" scroll="no"
          onload="loadMenu()" onresize="setHeightTable()">
        <div class="div"
             style="background-image: url(../images/mfbg.jpg); border-style: solid; border-width: 0px; border-color: #00529E"></div>
            <div
                style="height: 64px; width: 100%; position: absolute; top: 0; vertical-align: middle; left: 0; right: 0; background-image: url(../images/titlebg.jpg)">
                <table style="vertical-align: bottom" align="left" border="0px"
                       width="100%" height="100%" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="left" id="logo" width="219px"><span class="box box2"></span></td>
                        <td
                            style="vertical-align: top; font-size: 12px; color: #FFFFFF; font-weight: bold;">
                            <table width="100%" cellpadding="10" cellspacing="0">
                                <tr>
                                    <td id="currUserName"></td>
                                    <td style="cursor: pointer;" onclick="changpwd()">修改密码</td>
                                </tr>
                                <tr>
                                    <td colspan="2" id="currUserRegion"></td>
                                </tr>
                            </table>
                        </td>
                        <td>
                            <div id="idContainer"
                                 style="border-style: solid; overflow: hidden; width: 500px; height: 64px; border-width: 0px; border-color: #00529E">

                            </div>
                        </td>
                        <td width="60px">
                            <table>
                                <tr>
                                    <td><img src="../images/exit.jpg" onclick="logout()" /></td>
                                </tr>
                                <tr>
                                    <td><img src="../images/help.jpg" onclick="help()" /></td>
                                </tr>
                            </table>
                        </td>
                    </tr>

                </table>
            </div>

            <div align="center" id="neidiv"
                 style="height: 88.3%; width: 99.5%; margin-top: 64px; margin-left: 3px; margin-bottom: 3px; margin-right: 3px; position: absolute; top: 0; left: 0; right: 0; background-image: url(../images/nei.jpg)">
                <div id="panel" class="position">
                    <table width="100%" height="100%">
                        <tr>
                            <td style="cursor: pointer;" width="204px">
                                <div id="left"
                                     style="border-right: solid 1px #92B2BF; margin-left: -4px; margin-top: -2px">
                                </div>
                            </td>
                            <td onmouseover="stop()" bgcolor="#FFFFFF">
                                <div
                                    style="margin-left: 10px; margin-right: 2px; width: 100%; margin-top: -2px; overflow: auto; border-left: solid 1px #92B2BF;"
                                    id="mainframeDiv"></div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div id="tempdiv"></div>
    </body>
</html>



